package edu.cmu.cs.cs214.hw9.client.controllers.eventhandlers;

import edu.cmu.cs.cs214.hw9.client.controllers.*;

/**
 * Base for event handlers that require user session data.
 */
public abstract class SessionEventHandler extends EventHandler {
	protected SessionController controller;
	
	/**
	 * Constructs an event handler using the provided session controller 
	 * 
	 * @param controller Controller which will handle the associated event.
	 */
	protected SessionEventHandler(SessionController controller) {
		super(controller);
		this.controller = controller;
	}
	
	/**
	 * Method which screens will call in order to handle any "Event" - i.e. a 
	 * user interaction - that has occurred.
	 * 
	 * @param param Information about the event that occurred. Changes depending 
	 * 				on the event; for instance, an "Add friend" button click may 
	 * 				set param to the user to be added, while a "search" button click
	 * 				may set param to the search string.
	 */
	public abstract void handleEvent(Object param);
}
